package housing.task1.actor;

import housing.task1.generator.AutoCompleter;

import javax.xml.bind.annotation.XmlAttribute;

//@XmlRootElement(name = "human")
public abstract class Human {
    private static long _humanId = 0;

    //  @XmlAttribute(name = "human_id")
    private long _id;
    private String _firstName;
    private String _lastName;


    protected Human() {
        set_humanId();
        set_id(_humanId);
        set_firstName(AutoCompleter.Names.generate());
        set_lastName(AutoCompleter.Surnames.generate());
    }


    public abstract void act();

    @Override
    public abstract String toString(); // Overrides Object.toString()


    private void set_humanId() {
        ++_humanId;

    }

    public String get_firstName() {
        return _firstName;
    }

    public void set_firstName(String _firstName) {
        this._firstName = _firstName;
    }

    public String get_lastName() {
        return _lastName;
    }

    public void set_lastName(String _lastName) {
        this._lastName = _lastName;
    }

    @XmlAttribute(name = "human_id")
    public long get_id() {
        return _id;
    }

    public void set_id(long _id) {
        this._id = _id;
    }
}// class Human